import java.util.Scanner;

/**
 * Created by forcht on 2018/4/22.
 */
public class Main {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            String s=scanner.nextLine();
            String[] split = s.split(" ");
            for(int i=split.length-1;i>=0;i--){
                System.out.print(split[i]);
                if(i>0){
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }
}
